import { handleActions } from "redux-actions";
import { GET_GOODS_TYPE} from "../types";
import _ from "lodash";
const initData={
    curPage:1,
    eachPage:10,
    total:0,
    maxPage:0,
    rows:[],
};
export const goodstype=handleActions({
    [GET_GOODS_TYPE]:(state,{payload})=>{
        console.log("into");
        const {total,maxPage,rows}=payload
        console.log(total,maxPage,rows,"payload",state);
        return _.assign({},state,{total,maxPage,rows})
    }
},initData)